
let schedule = {};

alert(isEmpty(schedule));

schedule["8:30"] = "get up";

alert(isEmpty(schedule));

function isEmpty(obj) {
    let count = 0;
    for (let key in obj) {
        count++;
    }
    if (count == 0) {
        return true;
    }
    return false;
}